import { getTabList } from '../api'
import actionsType from './actionsType'
const actions = {
  // 7.使用状态管理容器redux，异步请求接口数据并实现列表数据的持久化
  getTabList() {
    return async dispatch => {
      const resp = await getTabList()
      dispatch({ type: actionsType.SET_TAB_LIST, payload: resp.data.data })
    }
  },
  addSearchHistory(payload) {
    return { type: actionsType.ADD_SEARCH_HISTORY, payload }
  }
}


export default actions